Optimal. Leaf size=285 \[ \frac {\left (8 a^3 b c d-8 a b^3 c d+a^4 \left (c^2-d^2\right )-6 a^2 b^2 \left (c^2-d^2\right )+b^4 \left (c^2-d^2\right )\right ) x}{\left (c^2+d^2\right )^2}-\frac {2 \left (a^2 c-b^2 c+2 a b d\right ) \left (2 a b c-a^2 d+b^2 d\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^2 f}-\frac {2 (b c-a d)^3 \left (a c d+b \left (c^2+2 d^2\right )\right ) \log (c+d \tan (e+f x))}{d^3 \left (c^2+d^2\right )^2 f}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.54, antiderivative size = 285, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3646, 3718,
3707, 3698, 31, 3556} \begin {gather*} -\frac {2 \left (a^2 c+2 a b d-b^2 c\right ) \left (a^2 (-d)+2 a b c+b^2 d\right ) \log (\cos (e+f x))}{f \left (c^2+d^2\right )^2}+\frac {x \left (a^4 \left (c^2-d^2\right )+8 a^3 b c d-6 a^2 b^2 \left (c^2-d^2\right )-8 a b^3 c d+b^4 \left (c^2-d^2\right )\right )}{\left (c^2+d^2\right )^2}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 f \left (c^2+d^2\right )}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d f \left (c^2+d^2\right ) (c+d \tan (e+f x))}-\frac {2 \left (a c d+b \left (c^2+2 d^2\right )\right ) (b c-a d)^3 \log (c+d \tan (e+f x))}{d^3 f \left (c^2+d^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3556
Rule 3646
Rule 3698
Rule 3707
Rule 3718
Rubi steps
\begin {align*} \int \frac {(a+b \tan (e+f x))^4}{(c+d \tan (e+f x))^2} \, dx &=-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {\int \frac {(a+b \tan (e+f x)) \left (2 b^3 c^2+a^3 c d-5 a b^2 c d+4 a^2 b d^2+d \left (3 a^2 b c-b^3 c-a^3 d+3 a b^2 d\right ) \tan (e+f x)-b \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan ^2(e+f x)\right )}{c+d \tan (e+f x)} \, dx}{d \left (c^2+d^2\right )}\\ &=-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}-\frac {\int \frac {-4 a b^3 c^2 d-a^4 c d^2+6 a^2 b^2 c d^2-4 a^3 b d^3+b^4 c \left (2 c^2+d^2\right )-d^2 \left (4 a^3 b c-4 a b^3 c-a^4 d+6 a^2 b^2 d-b^4 d\right ) \tan (e+f x)+2 b^3 (b c-2 a d) \left (c^2+d^2\right ) \tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{d^2 \left (c^2+d^2\right )}\\ &=\frac {\left (8 a^3 b c d-8 a b^3 c d+a^4 \left (c^2-d^2\right )-6 a^2 b^2 \left (c^2-d^2\right )+b^4 \left (c^2-d^2\right )\right ) x}{\left (c^2+d^2\right )^2}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac {\left (2 \left (a^2 c-b^2 c+2 a b d\right ) \left (2 a b c-a^2 d+b^2 d\right )\right ) \int \tan (e+f x) \, dx}{\left (c^2+d^2\right )^2}-\frac {\left (2 (b c-a d)^3 \left (a c d+b \left (c^2+2 d^2\right )\right )\right ) \int \frac {1+\tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{d^2 \left (c^2+d^2\right )^2}\\ &=\frac {\left (8 a^3 b c d-8 a b^3 c d+a^4 \left (c^2-d^2\right )-6 a^2 b^2 \left (c^2-d^2\right )+b^4 \left (c^2-d^2\right )\right ) x}{\left (c^2+d^2\right )^2}-\frac {2 \left (a^2 c-b^2 c+2 a b d\right ) \left (2 a b c-a^2 d+b^2 d\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^2 f}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}-\frac {\left (2 (b c-a d)^3 \left (a c d+b \left (c^2+2 d^2\right )\right )\right ) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,d \tan (e+f x)\right )}{d^3 \left (c^2+d^2\right )^2 f}\\ &=\frac {\left (8 a^3 b c d-8 a b^3 c d+a^4 \left (c^2-d^2\right )-6 a^2 b^2 \left (c^2-d^2\right )+b^4 \left (c^2-d^2\right )\right ) x}{\left (c^2+d^2\right )^2}-\frac {2 \left (a^2 c-b^2 c+2 a b d\right ) \left (2 a b c-a^2 d+b^2 d\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^2 f}-\frac {2 (b c-a d)^3 \left (a c d+b \left (c^2+2 d^2\right )\right ) \log (c+d \tan (e+f x))}{d^3 \left (c^2+d^2\right )^2 f}-\frac {b^2 \left (a d (2 b c-a d)-b^2 \left (2 c^2+d^2\right )\right ) \tan (e+f x)}{d^2 \left (c^2+d^2\right ) f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{d \left (c^2+d^2\right ) f (c+d \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 7.10, size = 1789, normalized size = 6.28 \begin {gather*} \frac {2 \left (-i b^4 c^{10} d^2+2 i a b^3 c^9 d^3-b^4 c^9 d^3+2 a b^3 c^8 d^4-3 i b^4 c^8 d^4-2 i a^3 b c^7 d^5+8 i a b^3 c^7 d^5-3 b^4 c^7 d^5+i a^4 c^6 d^6-2 a^3 b c^6 d^6-6 i a^2 b^2 c^6 d^6+8 a b^3 c^6 d^6-2 i b^4 c^6 d^6+a^4 c^5 d^7-6 a^2 b^2 c^5 d^7+6 i a b^3 c^5 d^7-2 b^4 c^5 d^7+i a^4 c^4 d^8-6 i a^2 b^2 c^4 d^8+6 a b^3 c^4 d^8+a^4 c^3 d^9+2 i a^3 b c^3 d^9-6 a^2 b^2 c^3 d^9+2 a^3 b c^2 d^{10}\right ) (e+f x) \cos ^2(e+f x) (c \cos (e+f x)+d \sin (e+f x))^2 (a+b \tan (e+f x))^4}{c^2 (c-i d)^4 (c+i d)^3 d^5 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2}-\frac {2 i \left (-b^4 c^5+2 a b^3 c^4 d-2 b^4 c^3 d^2-2 a^3 b c^2 d^3+6 a b^3 c^2 d^3+a^4 c d^4-6 a^2 b^2 c d^4+2 a^3 b d^5\right ) \text {ArcTan}(\tan (e+f x)) \cos ^2(e+f x) (c \cos (e+f x)+d \sin (e+f x))^2 (a+b \tan (e+f x))^4}{d^3 \left (c^2+d^2\right )^2 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2}-\frac {2 \left (-b^4 c+2 a b^3 d\right ) \cos ^2(e+f x) \log (\cos (e+f x)) (c \cos (e+f x)+d \sin (e+f x))^2 (a+b \tan (e+f x))^4}{d^3 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2}+\frac {\left (-b^4 c^5+2 a b^3 c^4 d-2 b^4 c^3 d^2-2 a^3 b c^2 d^3+6 a b^3 c^2 d^3+a^4 c d^4-6 a^2 b^2 c d^4+2 a^3 b d^5\right ) \cos ^2(e+f x) \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right ) (c \cos (e+f x)+d \sin (e+f x))^2 (a+b \tan (e+f x))^4}{d^3 \left (c^2+d^2\right )^2 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2}+\frac {\cos (e+f x) (c \cos (e+f x)+d \sin (e+f x)) \left (b^4 c^5 d+2 b^4 c^3 d^3+b^4 c d^5+a^4 c^4 d^2 (e+f x)-6 a^2 b^2 c^4 d^2 (e+f x)+b^4 c^4 d^2 (e+f x)+8 a^3 b c^3 d^3 (e+f x)-8 a b^3 c^3 d^3 (e+f x)-a^4 c^2 d^4 (e+f x)+6 a^2 b^2 c^2 d^4 (e+f x)-b^4 c^2 d^4 (e+f x)-b^4 c^5 d \cos (2 (e+f x))-2 b^4 c^3 d^3 \cos (2 (e+f x))-b^4 c d^5 \cos (2 (e+f x))+a^4 c^4 d^2 (e+f x) \cos (2 (e+f x))-6 a^2 b^2 c^4 d^2 (e+f x) \cos (2 (e+f x))+b^4 c^4 d^2 (e+f x) \cos (2 (e+f x))+8 a^3 b c^3 d^3 (e+f x) \cos (2 (e+f x))-8 a b^3 c^3 d^3 (e+f x) \cos (2 (e+f x))-a^4 c^2 d^4 (e+f x) \cos (2 (e+f x))+6 a^2 b^2 c^2 d^4 (e+f x) \cos (2 (e+f x))-b^4 c^2 d^4 (e+f x) \cos (2 (e+f x))+2 b^4 c^6 \sin (2 (e+f x))-4 a b^3 c^5 d \sin (2 (e+f x))+6 a^2 b^2 c^4 d^2 \sin (2 (e+f x))+3 b^4 c^4 d^2 \sin (2 (e+f x))-4 a^3 b c^3 d^3 \sin (2 (e+f x))-4 a b^3 c^3 d^3 \sin (2 (e+f x))+a^4 c^2 d^4 \sin (2 (e+f x))+6 a^2 b^2 c^2 d^4 \sin (2 (e+f x))+b^4 c^2 d^4 \sin (2 (e+f x))-4 a^3 b c d^5 \sin (2 (e+f x))+a^4 d^6 \sin (2 (e+f x))+a^4 c^3 d^3 (e+f x) \sin (2 (e+f x))-6 a^2 b^2 c^3 d^3 (e+f x) \sin (2 (e+f x))+b^4 c^3 d^3 (e+f x) \sin (2 (e+f x))+8 a^3 b c^2 d^4 (e+f x) \sin (2 (e+f x))-8 a b^3 c^2 d^4 (e+f x) \sin (2 (e+f x))-a^4 c d^5 (e+f x) \sin (2 (e+f x))+6 a^2 b^2 c d^5 (e+f x) \sin (2 (e+f x))-b^4 c d^5 (e+f x) \sin (2 (e+f x))\right ) (a+b \tan (e+f x))^4}{2 c (c-i d)^2 (c+i d)^2 d^2 f (a \cos (e+f x)+b \sin (e+f x))^4 (c+d \tan (e+f x))^2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.36, size = 364, normalized size = 1.28
method | result | size |
derivativedivides | \(\frac {\frac {b^{4} \tan \left (f x +e \right )}{d^{2}}-\frac {a^{4} d^{4}-4 a^{3} b c \,d^{3}+6 a^{2} b^{2} c^{2} d^{2}-4 a \,b^{3} c^{3} d +b^{4} c^{4}}{d^{3} \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {\left (2 a^{4} c \,d^{4}-4 a^{3} b \,c^{2} d^{3}+4 a^{3} b \,d^{5}-12 a^{2} b^{2} c \,d^{4}+4 a \,b^{3} c^{4} d +12 a \,b^{3} c^{2} d^{3}-2 b^{4} c^{5}-4 b^{4} c^{3} d^{2}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d^{3} \left (c^{2}+d^{2}\right )^{2}}+\frac {\frac {\left (-2 a^{4} c d +4 a^{3} b \,c^{2}-4 a^{3} b \,d^{2}+12 a^{2} b^{2} c d -4 a \,b^{3} c^{2}+4 a \,b^{3} d^{2}-2 b^{4} c d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (a^{4} c^{2}-a^{4} d^{2}+8 a^{3} b c d -6 a^{2} b^{2} c^{2}+6 a^{2} b^{2} d^{2}-8 a \,b^{3} c d +b^{4} c^{2}-b^{4} d^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{2}}}{f}\) | \(364\) |
default | \(\frac {\frac {b^{4} \tan \left (f x +e \right )}{d^{2}}-\frac {a^{4} d^{4}-4 a^{3} b c \,d^{3}+6 a^{2} b^{2} c^{2} d^{2}-4 a \,b^{3} c^{3} d +b^{4} c^{4}}{d^{3} \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )}+\frac {\left (2 a^{4} c \,d^{4}-4 a^{3} b \,c^{2} d^{3}+4 a^{3} b \,d^{5}-12 a^{2} b^{2} c \,d^{4}+4 a \,b^{3} c^{4} d +12 a \,b^{3} c^{2} d^{3}-2 b^{4} c^{5}-4 b^{4} c^{3} d^{2}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d^{3} \left (c^{2}+d^{2}\right )^{2}}+\frac {\frac {\left (-2 a^{4} c d +4 a^{3} b \,c^{2}-4 a^{3} b \,d^{2}+12 a^{2} b^{2} c d -4 a \,b^{3} c^{2}+4 a \,b^{3} d^{2}-2 b^{4} c d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (a^{4} c^{2}-a^{4} d^{2}+8 a^{3} b c d -6 a^{2} b^{2} c^{2}+6 a^{2} b^{2} d^{2}-8 a \,b^{3} c d +b^{4} c^{2}-b^{4} d^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{2}}}{f}\) | \(364\) |
norman | \(\frac {\frac {b^{4} \left (\tan ^{2}\left (f x +e \right )\right )}{d f}+\frac {c \left (a^{4} c^{2}-a^{4} d^{2}+8 a^{3} b c d -6 a^{2} b^{2} c^{2}+6 a^{2} b^{2} d^{2}-8 a \,b^{3} c d +b^{4} c^{2}-b^{4} d^{2}\right ) x}{c^{4}+2 c^{2} d^{2}+d^{4}}+\frac {d \left (a^{4} c^{2}-a^{4} d^{2}+8 a^{3} b c d -6 a^{2} b^{2} c^{2}+6 a^{2} b^{2} d^{2}-8 a \,b^{3} c d +b^{4} c^{2}-b^{4} d^{2}\right ) x \tan \left (f x +e \right )}{c^{4}+2 c^{2} d^{2}+d^{4}}-\frac {a^{4} d^{4}-4 a^{3} b c \,d^{3}+6 a^{2} b^{2} c^{2} d^{2}-4 a \,b^{3} c^{3} d +2 b^{4} c^{4}+b^{4} c^{2} d^{2}}{f \,d^{3} \left (c^{2}+d^{2}\right )}}{c +d \tan \left (f x +e \right )}-\frac {\left (a^{4} c d -2 a^{3} b \,c^{2}+2 a^{3} b \,d^{2}-6 a^{2} b^{2} c d +2 a \,b^{3} c^{2}-2 a \,b^{3} d^{2}+b^{4} c d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{f \left (c^{4}+2 c^{2} d^{2}+d^{4}\right )}+\frac {2 \left (a^{4} c \,d^{4}-2 a^{3} b \,c^{2} d^{3}+2 a^{3} b \,d^{5}-6 a^{2} b^{2} c \,d^{4}+2 a \,b^{3} c^{4} d +6 a \,b^{3} c^{2} d^{3}-b^{4} c^{5}-2 b^{4} c^{3} d^{2}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (c^{4}+2 c^{2} d^{2}+d^{4}\right ) d^{3} f}\) | \(506\) |
risch | \(\text {Expression too large to display}\) | \(1458\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.56, size = 379, normalized size = 1.33 \begin {gather*} \frac {\frac {b^{4} \tan \left (f x + e\right )}{d^{2}} + \frac {{\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{2} + 8 \, {\left (a^{3} b - a b^{3}\right )} c d - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} d^{2}\right )} {\left (f x + e\right )}}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {2 \, {\left (b^{4} c^{5} - 2 \, a b^{3} c^{4} d + 2 \, b^{4} c^{3} d^{2} - 2 \, a^{3} b d^{5} + 2 \, {\left (a^{3} b - 3 \, a b^{3}\right )} c^{2} d^{3} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c d^{4}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{4} d^{3} + 2 \, c^{2} d^{5} + d^{7}} + \frac {{\left (2 \, {\left (a^{3} b - a b^{3}\right )} c^{2} - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c d - 2 \, {\left (a^{3} b - a b^{3}\right )} d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {b^{4} c^{4} - 4 \, a b^{3} c^{3} d + 6 \, a^{2} b^{2} c^{2} d^{2} - 4 \, a^{3} b c d^{3} + a^{4} d^{4}}{c^{3} d^{3} + c d^{5} + {\left (c^{2} d^{4} + d^{6}\right )} \tan \left (f x + e\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 713 vs.
\(2 (289) = 578\).
time = 1.63, size = 713, normalized size = 2.50 \begin {gather*} -\frac {b^{4} c^{4} d^{2} - 4 \, a b^{3} c^{3} d^{3} + 6 \, a^{2} b^{2} c^{2} d^{4} - 4 \, a^{3} b c d^{5} + a^{4} d^{6} - {\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{3} d^{3} + 8 \, {\left (a^{3} b - a b^{3}\right )} c^{2} d^{4} - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c d^{5}\right )} f x - {\left (b^{4} c^{4} d^{2} + 2 \, b^{4} c^{2} d^{4} + b^{4} d^{6}\right )} \tan \left (f x + e\right )^{2} + {\left (b^{4} c^{6} - 2 \, a b^{3} c^{5} d + 2 \, b^{4} c^{4} d^{2} - 2 \, a^{3} b c d^{5} + 2 \, {\left (a^{3} b - 3 \, a b^{3}\right )} c^{3} d^{3} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c^{2} d^{4} + {\left (b^{4} c^{5} d - 2 \, a b^{3} c^{4} d^{2} + 2 \, b^{4} c^{3} d^{3} - 2 \, a^{3} b d^{6} + 2 \, {\left (a^{3} b - 3 \, a b^{3}\right )} c^{2} d^{4} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c d^{5}\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {d^{2} \tan \left (f x + e\right )^{2} + 2 \, c d \tan \left (f x + e\right ) + c^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left (b^{4} c^{6} - 2 \, a b^{3} c^{5} d + 2 \, b^{4} c^{4} d^{2} - 4 \, a b^{3} c^{3} d^{3} + b^{4} c^{2} d^{4} - 2 \, a b^{3} c d^{5} + {\left (b^{4} c^{5} d - 2 \, a b^{3} c^{4} d^{2} + 2 \, b^{4} c^{3} d^{3} - 4 \, a b^{3} c^{2} d^{4} + b^{4} c d^{5} - 2 \, a b^{3} d^{6}\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left (2 \, b^{4} c^{5} d - 4 \, a b^{3} c^{4} d^{2} - 4 \, a^{3} b c^{2} d^{4} + 2 \, {\left (3 \, a^{2} b^{2} + b^{4}\right )} c^{3} d^{3} + {\left (a^{4} + b^{4}\right )} c d^{5} + {\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{2} d^{4} + 8 \, {\left (a^{3} b - a b^{3}\right )} c d^{5} - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} d^{6}\right )} f x\right )} \tan \left (f x + e\right )}{{\left (c^{4} d^{4} + 2 \, c^{2} d^{6} + d^{8}\right )} f \tan \left (f x + e\right ) + {\left (c^{5} d^{3} + 2 \, c^{3} d^{5} + c d^{7}\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 2.08, size = 8928, normalized size = 31.33 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 589 vs.
\(2 (289) = 578\).
time = 1.06, size = 589, normalized size = 2.07 \begin {gather*} \frac {\frac {b^{4} \tan \left (f x + e\right )}{d^{2}} + \frac {{\left (a^{4} c^{2} - 6 \, a^{2} b^{2} c^{2} + b^{4} c^{2} + 8 \, a^{3} b c d - 8 \, a b^{3} c d - a^{4} d^{2} + 6 \, a^{2} b^{2} d^{2} - b^{4} d^{2}\right )} {\left (f x + e\right )}}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} + \frac {{\left (2 \, a^{3} b c^{2} - 2 \, a b^{3} c^{2} - a^{4} c d + 6 \, a^{2} b^{2} c d - b^{4} c d - 2 \, a^{3} b d^{2} + 2 \, a b^{3} d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{4} + 2 \, c^{2} d^{2} + d^{4}} - \frac {2 \, {\left (b^{4} c^{5} - 2 \, a b^{3} c^{4} d + 2 \, b^{4} c^{3} d^{2} + 2 \, a^{3} b c^{2} d^{3} - 6 \, a b^{3} c^{2} d^{3} - a^{4} c d^{4} + 6 \, a^{2} b^{2} c d^{4} - 2 \, a^{3} b d^{5}\right )} \log \left ({\left | d \tan \left (f x + e\right ) + c \right |}\right )}{c^{4} d^{3} + 2 \, c^{2} d^{5} + d^{7}} + \frac {2 \, b^{4} c^{5} d \tan \left (f x + e\right ) - 4 \, a b^{3} c^{4} d^{2} \tan \left (f x + e\right ) + 4 \, b^{4} c^{3} d^{3} \tan \left (f x + e\right ) + 4 \, a^{3} b c^{2} d^{4} \tan \left (f x + e\right ) - 12 \, a b^{3} c^{2} d^{4} \tan \left (f x + e\right ) - 2 \, a^{4} c d^{5} \tan \left (f x + e\right ) + 12 \, a^{2} b^{2} c d^{5} \tan \left (f x + e\right ) - 4 \, a^{3} b d^{6} \tan \left (f x + e\right ) + b^{4} c^{6} - 6 \, a^{2} b^{2} c^{4} d^{2} + 3 \, b^{4} c^{4} d^{2} + 8 \, a^{3} b c^{3} d^{3} - 8 \, a b^{3} c^{3} d^{3} - 3 \, a^{4} c^{2} d^{4} + 6 \, a^{2} b^{2} c^{2} d^{4} - a^{4} d^{6}}{{\left (c^{4} d^{3} + 2 \, c^{2} d^{5} + d^{7}\right )} {\left (d \tan \left (f x + e\right ) + c\right )}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.38, size = 347, normalized size = 1.22 \begin {gather*} \frac {\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (d^3\,\left (12\,a\,b^3\,c^2-4\,a^3\,b\,c^2\right )+d^4\,\left (2\,a^4\,c-12\,a^2\,b^2\,c\right )-2\,b^4\,c^5+4\,a^3\,b\,d^5-4\,b^4\,c^3\,d^2+4\,a\,b^3\,c^4\,d\right )}{f\,\left (c^4\,d^3+2\,c^2\,d^5+d^7\right )}+\frac {b^4\,\mathrm {tan}\left (e+f\,x\right )}{d^2\,f}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (a^4+a^3\,b\,4{}\mathrm {i}-6\,a^2\,b^2-a\,b^3\,4{}\mathrm {i}+b^4\right )}{2\,f\,\left (-c^2\,1{}\mathrm {i}+2\,c\,d+d^2\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (a^4\,1{}\mathrm {i}+4\,a^3\,b-a^2\,b^2\,6{}\mathrm {i}-4\,a\,b^3+b^4\,1{}\mathrm {i}\right )}{2\,f\,\left (-c^2+c\,d\,2{}\mathrm {i}+d^2\right )}-\frac {a^4\,d^4-4\,a^3\,b\,c\,d^3+6\,a^2\,b^2\,c^2\,d^2-4\,a\,b^3\,c^3\,d+b^4\,c^4}{d\,f\,\left (\mathrm {tan}\left (e+f\,x\right )\,d^3+c\,d^2\right )\,\left (c^2+d^2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________